<?php
/**
 * 用户账户收益冻结日志
 */
namespace App\Models\MainDB;

use Illuminate\Database\Eloquent\Model;

class UserEarningsFreezeLog extends Model{

    protected $table = 'ln_user_earnings_freeze_log';

    protected $primaryKey = 'log_id';

    protected $fillable = [
        "log_id",
        "admin_id",
        "user_id",
        "client_ip",
        "add_time",
        "content",
        "type",
    ];

    public $timestamps = false;

    public function add($request, $content, $type = 1)
    {
        $data['admin_id'] = $request->admin_id;
        $data['user_id'] = $request->user_id;
        $data['client_ip'] = $request->server('REMOTE_ADDR');
        $data['content'] = $content;
        $data['add_time'] = time();
        $data['type'] = $type;
        $this->insert($data);
    }
}